package com.atbeijing.gmall.service.impl;

import com.atbeijing.gmall.bean.ProductStats;
import com.atbeijing.gmall.mapper.ProductStatsMapper;
import com.atbeijing.gmall.service.ProductStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ProductStatsServiceImpl implements ProductStatsService {

    @Autowired
    ProductStatsMapper productStatsMapper;

    @Override
    public BigDecimal getGMV(Integer date) {
        return productStatsMapper.getGMV(date);
    }

    @Override
    public List<ProductStats> selectProductStatsByTm(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsByTm(date,limit);
    }

    @Override
    public List<ProductStats> selectProductStatsByCategory3(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsByCategory3(date,limit);
    }

    @Override
    public List<ProductStats> selectProductStatsBySpu(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsBySpu(date,limit);
    }


}
